
  ___  ____  ____  ____  ____ (R)
 /__    /   ____/   /   ____/
___/   /   /___/   /   /___/   15.1   Copyright 1985-2017 StataCorp LLC
  Statistics/Data Analysis            StataCorp
                                      4905 Lakeway Drive
     MP - Parallel Edition            College Station, Texas 77845 USA
                                      800-STATA-PC        http://www.stata.com
                                      979-696-4600        stata@stata.com
                                      979-696-4601 (fax)

32-user 64-core Stata network perpetual license:
       Serial number:  501506200495
         Licensed to:  Harvard-MIT Data Center
                       Cambridge, MA

Notes:
      1.  Stata is running in batch mode.
      2.  Unicode is supported; see help unicode_advice.
      3.  More than 2 billion observations are allowed; see help obs_advice.
      4.  Maximum number of variables is set to 5000; see help set_maxvar.

. do "dofiles/15_Table_A11.do" 

. /****************************************************************************
> *****************************
> Replication Files for Housing Discrimination and the Toxics Exposure Gap in t
> he United States: 
> Evidence from the Rental Market  by Peter Christensen, Ignacio Sarmiento-Barb
> ieri and Christopher Timmins
> *****************************************************************************
> ****************************/
. 
. clear all

. set matsize 11000

. 
. use "../stores/toxic_discrimination_data.dta"

. 
. 
. keep if sample==1
(801 observations deleted)

. 
. loc quartiles 4

. set seed 1010101

. 
. *****************************************************************************
> *******************
. * Prep data
. *****************************************************************************
> *******************
. gen low=(education_level==2)

. gen medium=(education_level==3)

. gen high=(education_level==1)

. 
. 
. 
. forvalues i = 2/`quartiles'{
  2.         foreach edu in low medium high {
  3.                 gen Hispanic_dec`i'_`edu'=Hispanic*dec`i'*`edu'
  4.                 gen Black_dec`i'_`edu'=Black*dec`i'*`edu'
  5.                 gen Minority_dec`i'_`edu'=Minority*dec`i'*`edu'
  6.         }
  7. 
. }

. 
. 
. 
. *****************************************************************************
> *******************
. * Minority
. *****************************************************************************
> *******************
. 
. 
. 
. eststo: disc_boot choice Minority_dec2_low  Minority_dec3_low Minority_dec4_l
> ow /// 
>                                 Minority_dec2_medium Minority_dec3_medium Min
> ority_dec4_medium ///
>                             Minority_dec2_high Minority_dec3_high Minority_de
> c4_high ///
>                          , varlist(i.gender i.order)
note: multiple positive outcomes within groups encountered.
note: 1,331 groups (3,993 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood = -924.11692  
Iteration 1:   log pseudolikelihood = -914.61221  
Iteration 2:   log pseudolikelihood = -914.58847  
Iteration 3:   log pseudolikelihood = -914.58847  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      2,730
                                                Wald chi2(12)     =    3203.31
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -914.58847               Pseudo R2         =     0.0852

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Minori~2_low |  -.6547788   .1828457    -3.58   0.000    -.9555333   -.3540244
Minori~3_low |  -.5089497   .1682645    -3.02   0.002    -.7857201   -.2321793
Minori~4_low |   .2635846    .189045     1.39   0.163    -.0473668    .5745359
Min~2_medium |  -.6019222   .2248484    -2.68   0.007    -.9717649   -.2320795
Min~3_medium |  -.4767028   .2321013    -2.05   0.040    -.8584755   -.0949301
Min~4_medium |  -.0949607   .2706086    -0.35   0.726    -.5400722    .3501508
Minor~2_high |  -.2922485   .1746808    -1.67   0.094    -.5795729   -.0049242
Minor~3_high |  -.0751759   .1392708    -0.54   0.589     -.304256    .1539043
Minor~4_high |   .3168164   .1649372     1.92   0.055     .0455189    .5881139
             |
      gender |
       male  |  -.3149014   .0899582    -3.50   0.000    -.4628694   -.1669334
             |
       order |
          2  |  -.3325161   .2454369    -1.35   0.175    -.7362238    .0711916
          3  |  -.8985535   .2005746    -4.48   0.000    -1.228469   -.5686377
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codeclus
> ter(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluste
> r(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Minori~2_low |  -.6547788   .2654008    -2.47   0.028    -1.124786   -.1847718
Minori~3_low |  -.5089497   .1956523    -2.60   0.022    -.8554369   -.1624625
Minori~4_low |   .2635846   .1894741     1.39   0.188    -.0719615    .5991306
Min~2_medium |  -.6019222   .2204759    -2.73   0.017    -.9923704    -.211474
Min~3_medium |  -.4767028   .2346627    -2.03   0.063    -.8922749   -.0611308
Min~4_medium |  -.0949607    .267254    -0.36   0.728    -.5682498    .3783284
Minor~2_high |  -.2922485   .1727837    -1.69   0.115     -.598237      .01374
Minor~3_high |  -.0751759   .1383941    -0.54   0.596    -.3202627    .1699109
Minor~4_high |   .3168164   .1801742     1.76   0.102    -.0022602    .6358929
------------------------------------------------------------------------------
(est1 stored)

. sum choice if White==1 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      2,241    .3944668    .4888449          0          1

. estadd scalar responsewhite = r(mean), replace 

added scalar:
      e(responsewhite) =  .39446676

. estadd local gender = "Yes", replace 

added macro:
             e(gender) : "Yes"

. estadd local order = "Yes", replace 

added macro:
              e(order) : "Yes"

. estimates store model1

. 
. 
. 
. 
. 
. *****************************************************************************
> *******************
. * African American vs Hispanic/LatinX
. *****************************************************************************
> *******************
. 
. eststo: disc_boot choice Black_dec2_low  Black_dec3_low Black_dec4_low ///
>                           Black_dec2_medium    Black_dec3_medium  Black_dec4_
> medium  ///
>                           Black_dec2_high      Black_dec3_high Black_dec4_hig
> h ///
>                           Hispanic_dec2_low    Hispanic_dec3_low Hispanic_dec
> 4_low ///
>                           Hispanic_dec2_medium Hispanic_dec3_medium Hispanic_
> dec4_medium ///
>                           Hispanic_dec2_high   Hispanic_dec3_high Hispanic_de
> c4_high ///
>                          , varlist(i.gender  i.order)
note: multiple positive outcomes within groups encountered.
note: 1,331 groups (3,993 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood = -905.58079  
Iteration 1:   log pseudolikelihood = -894.36997  
Iteration 2:   log pseudolikelihood = -894.30786  
Iteration 3:   log pseudolikelihood = -894.30786  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      2,730
                                                Wald chi2(13)     =          .
                                                Prob > chi2       =          .
Log pseudolikelihood = -894.30786               Pseudo R2         =     0.1055

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Black_dec2~w |  -1.178018     .23761    -4.96   0.000    -1.568852   -.7871847
Black_dec3~w |  -.9628977    .318083    -3.03   0.002    -1.486098   -.4396978
Black_dec4~w |   .3249407   .2861322     1.14   0.256    -.1457049    .7955862
Black_dec2~m |  -.8499159   .3197723    -2.66   0.008    -1.375894   -.3239373
Black_dec3~m |  -.7888595   .3237507    -2.44   0.015    -1.321382    -.256337
Black_dec4~m |  -.4643796   .3341269    -1.39   0.165    -1.013969    .0852101
Black_dec2~h |  -.4614665   .2165701    -2.13   0.033    -.8176926   -.1052403
Black_dec3~h |  -.1955349   .1803492    -1.08   0.278     -.492183    .1011133
Black_dec4~h |   .2407739   .2689396     0.90   0.371    -.2015923    .6831401
Hispan~2_low |  -.2237099   .2817608    -0.79   0.427    -.6871651    .2397454
Hispan~3_low |  -.1831005   .1751982    -1.05   0.296    -.4712759    .1050749
Hispan~4_low |   .2024804   .2252609     0.90   0.369    -.1680407    .5730016
His~2_medium |  -.4132919   .1742016    -2.37   0.018     -.699828   -.1267558
His~3_medium |  -.1325712   .1647075    -0.80   0.421    -.4034909    .1383485
His~4_medium |   .2366905   .2971293     0.80   0.426    -.2520438    .7254247
Hispa~2_high |  -.0620754   .2084755    -0.30   0.766    -.4049871    .2808364
Hispa~3_high |   .0760196   .2337981     0.33   0.745     -.308544    .4605832
Hispa~4_high |   .4123617   .1925914     2.14   0.032     .0955771    .7291464
             |
      gender |
       male  |  -.3156556   .0948679    -3.33   0.001    -.4716994   -.1596118
             |
       order |
          2  |  -.3300112   .2545874    -1.30   0.195    -.7487702    .0887478
          3  |  -.9092762    .205251    -4.43   0.000    -1.246884   -.5716684
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codeclus
> ter(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluste
> r(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(
> Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zi
> p_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_
> Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Black_dec2~w |  -1.178018   .3824316    -3.08   0.009    -1.855279   -.5007576
Black_dec3~w |  -.9628977   .3402576    -2.83   0.014    -1.565471    -.360324
Black_dec4~w |   .3249407   .2833039     1.15   0.272    -.1767717    .8266531
Black_dec2~m |  -.8499159   .2968571    -2.86   0.013     -1.37563   -.3242017
Black_dec3~m |  -.7888595   .3369143    -2.34   0.036    -1.385512   -.1922067
Black_dec4~m |  -.4643796   .3319416    -1.40   0.185    -1.052226    .1234669
Black_dec2~h |  -.4614665   .2167465    -2.13   0.053    -.8453101   -.0776229
Black_dec3~h |  -.1955349   .1660293    -1.18   0.260    -.4895616    .0984919
Black_dec4~h |   .2407739   .2793986     0.86   0.404    -.2540224    .7355701
Hispan~2_low |  -.2237099    .296504    -0.75   0.464    -.7487987     .301379
Hispan~3_low |  -.1831005   .1824221    -1.00   0.334     -.506158    .1399569
Hispan~4_low |   .2024804   .2232647     0.91   0.381    -.1929065    .5978674
His~2_medium |  -.4132919   .1637898    -2.52   0.025    -.7033527    -.123231
His~3_medium |  -.1325712   .1650707    -0.80   0.436    -.4249004     .159758
His~4_medium |   .2366905   .3188174     0.74   0.471    -.3279138    .8012948
Hispa~2_high |  -.0620754   .2107846    -0.29   0.773     -.435361    .3112102
Hispa~3_high |   .0760196   .2321523     0.33   0.749    -.3351066    .4871457
Hispa~4_high |   .4123617   .1921797     2.15   0.051     .0720243    .7526992
------------------------------------------------------------------------------
(est2 stored)

. sum choice if White==1 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      2,241    .3944668    .4888449          0          1

. estadd scalar responsewhite = r(mean), replace 

added scalar:
      e(responsewhite) =  .39446676

. estadd local gender = "Yes", replace 

added macro:
             e(gender) : "Yes"

. estadd local order = "Yes", replace                      

added macro:
              e(order) : "Yes"

. estimates store model2

. 
. 
. 
. 
. *****************************************************************************
> *******************
. * Export to latex
. * based on http://www.eyalfrank.com/code-riffs-stata-and-regression-tables/
. *****************************************************************************
> *******************
. 
. 
. #delimit ; 
delimiter now ;
. esttab model1
>           model2
>        using "../views/tableA11.tex",  
>        style(tex) 
>        eform
>        cells(b(star fmt(4)) ci(par fmt(4) par(( , )))  ) 
>        label 
>        stats(responsewhite
>              gender  
>              order
>              N
>              listings
>              diff_response, fmt(2 0 0 %9.0gc %9.0gc 2)
>              labels(" Mean Response (White)"
>                    "\hline Gender" 
>                    "Inquiry Order"
>                    "\hline Observations"
>                    "Listings"
>                    "\% w. diff. response"
>                    )) 
>        mlabels( ,none)  
>        nonumbers
>        collabels(,none) 
>        eqlabels(,none)
>        varlabels(Hispanic_dec2_low      "Hispanic/LatinX 0-25th perc. Toxic C
> oncentration $\times$ Low"
>                                 Hispanic_dec2_medium    "Hispanic/LatinX 0-25
> th perc. Toxic Concentration $\times$ Medium"
>                                 Hispanic_dec2_high      "Hispanic/LatinX 0-25
> th perc. Toxic Concentration $\times$ High"
>                                 Black_dec2_low          "Af. American 0-25th 
> perc. Toxic Concentration $\times$ Low"
>                                 Black_dec2_medium       "Af. American 0-25th 
> perc. Toxic Concentration $\times$ Medium"
>                                 Black_dec2_high                 "Af. American
>  0-25th perc. Toxic Concentration  $\times$ High"
>                                 Minority_dec2_low       "Minority 0-25th perc
> . Toxic Concentration $\times$ Low"
>                                 Minority_dec2_medium    "Minority 0-25th perc
> . Toxic Concentration $\times$ Medium"
>                                 Minority_dec2_high      "Minority 0-25th perc
> . Toxic Concentration $\times$ High"
>                                 Hispanic_dec3_low       "Hispanic/LatinX 25-7
> 5th perc. Toxic Concentration $\times$ Low"
>                                 Hispanic_dec3_medium    "Hispanic/LatinX 25-7
> 5th perc. Toxic Concentration $\times$ Medium"
>                                 Hispanic_dec3_high      "Hispanic/LatinX 25-7
> 5th perc. Toxic Concentration $\times$ High"
>                                 Black_dec3_low          "Af. American 25-75th
>  perc. Toxic Concentration $\times$ Low"
>                                 Black_dec3_medium       "Af. American 25-75th
>  perc. Toxic Concentration $\times$ Medium"
>                                 Black_dec3_high                 "Af. American
>  25-75th perc. Toxic Concentration  $\times$ High"
>                                 Minority_dec3_low       "Minority 25-75th per
> c. Toxic Concentration $\times$ Low"
>                                 Minority_dec3_medium    "Minority 25-75th per
> c. Toxic Concentration $\times$ Medium"
>                                 Minority_dec3_high      "Minority 25-75th per
> c. Toxic Concentration $\times$ High"
>                                 Hispanic_dec4_low       "Hispanic/LatinX 75-1
> 00th perc. Toxic Concentration $\times$ Low"
>                                 Hispanic_dec4_medium    "Hispanic/LatinX 75-1
> 00th perc. Toxic Concentration $\times$ Medium"
>                                 Hispanic_dec4_high      "Hispanic/LatinX 75-1
> 00th perc. Toxic Concentration $\times$ High"
>                                 Black_dec4_low          "Af. American 75-100t
> h perc. Toxic Concentration $\times$ Low"
>                                 Black_dec4_medium       "Af. American 75-100t
> h perc. Toxic Concentration $\times$ Medium"
>                                 Black_dec4_high                 "Af. American
>  75-100th perc. Toxic Concentration  $\times$ High"
>                                 Minority_dec4_low       "Minority 75-100th pe
> rc. Toxic Concentration $\times$ Low"
>                                 Minority_dec4_medium    "Minority 75-100th pe
> rc. Toxic Concentration $\times$ Medium"
>                                 Minority_dec4_high      "Minority 75-100th pe
> rc. Toxic Concentration $\times$ High") 
>        starl(* 0.1 ** 0.05 *** 0.01)   
>        level(90) 
>        prehead(
> \begin{table}[H]
> \tiny \centering
> \begin{threeparttable}
> \captionsetup{justification=centering}
>   \caption{Estimates of Discriminatory Constraint on Housing Choice \\ Hetero
> geneity by Maternal Education }
>   
>   \label{tab:heterogeneityedu}
> 
> \begin{tabular}{@{\extracolsep{5pt}}lcc}
> \\[-1.8ex]\hline
> \hline \\[-1.8ex]
>  & \multicolumn{2}{c}{\textit{Dependent variable: {\it  Response}}} \\
>  \cline{2-3}
> 
> 
> \\[-1.8ex] & (1) & (2)  \\
> \hline \\[-1.8ex] 
>        )
>        posthead(\hline) 
>        prefoot() 
>        postfoot(
> \hline
> \hline \\[-1.8ex]
> \end{tabular}
> \begin{tablenotes}[scriptsize,flushleft] \scriptsize
> \item Notes:
> \end{tablenotes}
> \end{threeparttable}
> \end{table}
> 
>        )
>        replace;
(output written to ../views/tableA11.tex)

. #delimit cr
delimiter now cr
. 
. 
. 
. 
. *end
. 
. 
end of do-file
